<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
<HEAD>

  <TITLE>CS810 -- Advanced Programming in the UNIX Environment</TITLE>
  <STYLE type="text/css">
  body {
  background-color: #FFFFFf;
  }
  </STYLE>
  <STYLE type="text/css">
  li.c1 {list-style: none}
  </STYLE>

</HEAD>

<BODY>
  <TABLE border="1" align="center" cellpadding="15">
    <TR>
      <TD valign="top">
        <H2>CS810 -- Advanced Programming in the UNIX Environment - Fall 2010 - HW#1</H2>

        <H3>HW#1: a simple test</H3>

        <H4>Summary</H4>
	<p>The objective of this assignment is for you to get used to
	writing test cases prior to writing any programs.  The test you
	write for this assignment will then be used lateron to verify the
	program you will write in the next assignment.</p>
	<h4>Problem assignment</h4>
	<p>Write a test to verify that a given program correctly copies one
	file to anther.
	You may write your test in any language you may wish, though a
	simple shell script might be fully sufficient in this case.
	Some of the things to consider:
        <ul>
          <li>verify the program correctly handles missing or wrong input arguments</li>
          <li>verify the program correctly handles missing or wrong input
	  files (source or target is a directory, lacking read- or write
	  access, etc.)</li>
	  <li>verify the program correctly handles relative and absolute paths</li>
	  <li>verify the program returns the correct return code</li>
	  <li>verify the source and target are identical after the program
	  has finished</li>
        </ul>
	</p>
	<h4>Deliverables and Due Date</H4>
	<p>You will submit a single <tt>tar</tt> archive named
	<em>username</em>-hw1.tar that will extract
	into a directory named after your username.  In that directory
	will be at least a <tt>Makefile</tt> and whatever other files you
	created to implement the test.  If you have any commentary on your
	submission, include it in a file callead <tt>README</tt>.  The Makefile has a single 'all'
	target that runs your test.  The name of the program to be tested
	is given via the <tt>PROG=name</tt> variable.
	</p>
	<p>
	For example, I would submit the file <tt>jschauma-hw1.tar</tt>
	which might extract the tests and let me run them as follows:
	</p>
	<p>
	<verbatim><tt><pre>
$ tar xvf jschauma-hw1.tar
jschauma
jschauma/hw1
jschauma/hw1/test-cp
jschauma/Makefile
$ cd jschauma
$ make PROG=/bin/cp
$ 
	</pre></tt></verbatim></p>
           <p>
             The due date for this assignment is 2010-09-20 18:15.  Please
             attach the file to an email sent from your <tt>@stevens.edu</tt>
             email address to <a
             href="mailto:jschauma@cs.stevens.edu?subject=[CS810] HW1">jschauma@cs.stevens.edu</a>
             with a subject of "[CS810] HW1".
           </p>

        <hr>
        [<a href="index.html">Course Website</a>]
</BODY>
</HTML>
